//
//  SYSXAlterView.m
//  SanYiTeaching
//
//  Created by 郑浩然 on 2019/4/27.
//  Copyright © 2019年 SanYi. All rights reserved.
//

#import "SYSXAlterView.h"

@interface SYSXAlterView ()

@property (strong, nonatomic) SYSXAlterView *alterView;


@end



@implementation SYSXAlterView

- (void)awakeFromNib {
    [super awakeFromNib];
    self.alterView.layer.masksToBounds = YES;
    self.alterView.layer.cornerRadius = 5;
}
- (IBAction)quxiaoBtnClick:(UIButton *)sender {
    __weak typeof(self) weakSelf = self;
    [UIView animateWithDuration:kAnimate animations:^{
        weakSelf.alterView.frame = CGRectMake(0, kScreen_HEIGHT, kScreen_WIDTH, kScreen_HEIGHT);
    } completion:^(BOOL finished) {
        [weakSelf.alterView removeFromSuperview];
    }];
}


- (void)showKaoShiBanJi:(SYSXAlterView *)alterView dataModel:(id)model {
    _alterView = alterView;
    UIWindow *window = [UIApplication sharedApplication].windows.firstObject;
    alterView.frame = CGRectMake(0, kScreen_HEIGHT, kScreen_WIDTH, kScreen_HEIGHT);
    [window addSubview:alterView];
    [UIView animateWithDuration:kAnimate animations:^{
        alterView.frame = CGRectMake(0, 0, kScreen_WIDTH, kScreen_HEIGHT);
    } completion:^(BOOL finished) {
        
    }];
    
}
@end














